﻿using System;
using System.ComponentModel;

namespace CommonDevelop
{
    /// <summary>
    /// 日志分类
    /// </summary>
    [Flags]
    public enum LogType : int
    {
        [Description("登录")]
        Login = 1,
        [Description("访问")]
        Visit = 2,
        [Description("操作")]
        Operation = 4,
        [Description("异常")]
        Abnormal = 8,
        [Description("更新")]
        Update = 16,
        [Description("删除")]
        Delelt = 32
    }

    /// <summary>
    /// 操作日志模型
    /// </summary>
    public class LogModel
    {
        /// <summary>
        /// 日志标题
        /// </summary>
        public string LogTitle { get; set; }
        /// <summary>
        /// 日志类型
        /// </summary>
        public LogType LogType { get; set; }
        /// <summary>
        /// 日志操作模块
        /// </summary>
        public string LogModule { get; set; }
        /// <summary>
        /// 对象主键
        /// </summary>
        public string ObjectId { get; set; }
        /// <summary>
        /// 数据
        /// </summary>
        public string ContentJson { get; set; }
        /// <summary>
        /// 结果
        /// </summary>
        public string ResultInfo { get; set; }
        /// <summary>
        /// 相关用户ID
        /// </summary>
        public string OperateUserId { get; set; }
        /// <summary>
        /// 相关账号
        /// </summary>
        public string OperateAccount { get; set; }
    }
}
